/*
 * @Author: 郭招娣 10615594+guo-zhaodi@user.noreply.gitee.com
 * @Date: 2022-08-19 19:29:50
 * @LastEditors: 郭招娣 10615594+guo-zhaodi@user.noreply.gitee.com
 * @LastEditTime: 2022-08-23 08:53:12
 * @FilePath: \后端管理系统\app\src\api\roles.js
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
import { getUrl, deleteUrl, putUrl, postUrl } from '../utils/request.js'


/**
 * @description: 角色列表
 * @param {*} url
 * @param {*} params
 * @return {*}
 */
export const httpRoles = async (url, params) => await getUrl(url,params);

/**
 * @description: 删除角色权限
 * @param {*} url
 * @param {*} params
 * @return {*}
 */
export const httpDelRolesRight = async (url, params) => await deleteUrl(url, params);

/**
 * @description: 删除角色
 * @param {*} url
 * @param {*} params
 * @return {*}
 */
export const httpDelRoles = async (url, params) => await deleteUrl(url, params);

/**
 * @description: 编辑角色
 * @param {*} url
 * @param {*} params
 * @return {*}
 */
export const httpEditRoles = async (url, params) => await putUrl(url, params);

/**
 * @description: 添加角色
 * @param {*} url
 * @param {*} params
 * @return {*}
 */
export const httpAddRoles = async (url, params) => await postUrl(url, params);

/**
 * @description: 权限列表
 * @param {*} url
 * @param {*} params
 * @return {*}
 */
export const httpRightsList = async (url, params) => await getUrl(url, params);

/**
 * @description: 角色授权
 * @param {*} url
 * @param {*} params
 * @return {*}
 */
export const httpRolesRights = async (url, params) => await postUrl(url, params);